#pragma once

#include "Containers/Containers.h"
#include "ScriptCompiler/AST/ASTNode.h"

class CScriptToken;
class CAccessLevelNode;
class CUsingNode;
class CNamespaceNode;
class CDelegateNode;
class CFunctionNode;
class CGSharpFieldNode;
class CPropertyNode;
class CEnumNode;
class CDecoratorNode;
class CConstructorNode;
class COperatorFunctionNode;

//class / struct / interface
class CClassNode : public CASTNode
{
public:
    CClassNode(std::weak_ptr<CScriptFileContext> InFile)
        : CASTNode(InFile,EASTNodeType::Class)
    {
    }

    std::shared_ptr<CScriptToken> Class;

    bool IsClass() const;
    bool IsInterface() const;
    bool IsStruct() const;

    //name of class
    std::shared_ptr<CScriptToken> Name; 

    TVector<std::shared_ptr<CScriptToken>> GenericPlaceholders;

    //parent name
    TVector<std::shared_ptr<CScriptToken>> ParentNames;

    TOptional<std::shared_ptr<CAccessLevelNode>> AccessLevel;

    TOptional<std::shared_ptr<CDecoratorNode>> Decorator;

    //classes/structs/interfaces
    TVector<std::shared_ptr<CClassNode>> Classes;

    TVector<std::shared_ptr<CDelegateNode>> Delegates;

    TVector<std::shared_ptr<CEnumNode>> Enums;

    TVector<std::shared_ptr<CFunctionNode>> Functions;

    TVector<std::shared_ptr<COperatorFunctionNode>> OperatorFunctions;

    TVector<std::shared_ptr<CGSharpFieldNode>> Fields;

    TVector<std::shared_ptr<CConstructorNode>> Constructors;

    TVector<std::shared_ptr<CPropertyNode>> Properties;


    virtual void DebugPrint(int32_t InDepth) override;

    virtual std::shared_ptr<CScriptToken> GetFirstToken() override { return Class; }

};